package object;

/**
 * @TODO 4. 求上个月的第三天是星期几
 * @Author xu
 * 2025/3/10
 */
import java.time.LocalDate;
import java.time.DayOfWeek;


public class LocalDate04 {
    public static void main(String[] args) {
        LocalDate today = LocalDate.now();
        LocalDate thirdDayLastMonth = today.minusMonths(1).withDayOfMonth(3);

        DayOfWeek dayOfWeek = thirdDayLastMonth.getDayOfWeek();
        System.out.println("上个月的第三天是: " + dayOfWeek);
    }
}
